﻿using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using SmartCity.Shared;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;

namespace CommonManagement
{
    /// <summary>
    /// 服务控制器
    /// </summary>
    [RemoteService]
    [Area("commonManagement")]
    [Route("api/commonManagement/services")]
    public class ServiceController : AbpController, IServiceAppService
    {
        private readonly IServiceAppService _serviceAppService;

        public ServiceController(
            IServiceAppService serviceAppService)
        {
            _serviceAppService = serviceAppService;
        }

        // 1.9.1 获取系统全部服务
        [HttpGet]
        [Route("list")]
        public Task<ListResponse<ServiceDto>> ListAsync(string isRecommend = null)
        {
            return _serviceAppService.ListAsync(isRecommend);
        }
    }
}